package com.project.biz;

import com.baomidou.mybatisplus.extension.service.IService;
import com.framework.core.result.BasePage;
import com.project.entity.CmsCapitalFlow;
import com.project.pojo.dto.*;
import com.project.pojo.model.AddSystemUpperScoreModel;
import com.project.pojo.model.GetCmsCapitalFlowModel;
import com.project.pojo.model.UpdateDeductionModel;

import java.util.List;

/**
 * @Description: 资金流水业务层接口类
 * @Author: zhuchi
 * @CreateDate: 2020/11/18 22:38
 * @Version: 1.0
 */
public interface CmsCapitalFlowBiz extends IService<CmsCapitalFlow> {

    /**
     * 按条件分页查询资金流水
     * @param model
     * @return
     */
    BasePage<CmsCapitalFlowDTO> getCapitalFlow(GetCmsCapitalFlowModel model);

    /**
     * 按条件查询资金流水
     * @param model
     * @return
     */
    List<CmsCapitalFlowDTO> getCapitalFlowList(GetCmsCapitalFlowModel model);

    /**
     * 添加充值记录
     * @param addRechargeFlowDTO
     * @param userId 用户ID
     * @return
     */
    int addRechargeFlow(AddRechargeFlowDTO addRechargeFlowDTO, Long userId);

    /**
     * 添加收益记录
     * @param addIncomeFlowDTO
     * @param userId 用户ID
     * @return
     */
    int addIncomeFlow(AddIncomeFlowDTO addIncomeFlowDTO, Long userId);

    /**
     * 添加消费记录
     * @param addConsumeFlowDTO
     * @param userId 用户ID
     * @return
     */
    int addConsumeFlow(AddConsumeFlowDTO addConsumeFlowDTO, Long userId);

    /**
     * 系统上分
     * @param addSystemUpperScoreModel
     * @param userId
     * @return
     */
    int addSystemUpperScore(AddSystemUpperScoreModel addSystemUpperScoreModel, Long userId);

    /**
     * 系统扣款
     * @param updateDeductionModel
     * @param userId
     * @return
     */
    int updateDeduction(UpdateDeductionModel updateDeductionModel, Long userId);

    /**
     * 后台统计
     * @return
     */
    FundStatisticsDTO getFundStatistics();

}
